I have been closely following the procedure
in the KSTEP
Basics Tutorial in order to bring up my 3 axis
engraving
mill, which uses open loop steppers. The Step
Response
screen works correctly (i.e., the motor for
the selected
axis will move and then return). So I have
adjusted V,A,J
and created an init.c file that includes the
statement
DefineCoordSystem(0,1,2,-1)
The problem is that when I start up
KmotionCNC, I cannot
jog any of the 3 axes; they do not move when
the buttons
are clicked. So I am not ready to proceed with
G code.
In an effort to debug, I can go back to
Kmotion and find
that the Step Response screen no longer works.
I can only
make it work again by cycling power to
KFLOP/KSTEP and NOT
running my init.c file. The same behavior
occurs with the
Console screen; a MoveRel script command works
only if I
have NOT run the init.c file.
By trial and error, I find that the statement
that has
seized all axis motion is the
DefineCoordSystem()
statement. If I remove it from init.c, then I
can run the
Step Response moves, and MoveRel on the
Console. This is
entirely unexpected; I thought the
DefineCoordSystem() was
just providing some information needed by
KmotionCNC.
Question 1) What is it that I do not
understand?
Additional information:
I am running software version 4.33, but my
USB driver is
from 4.34 (signed).
I have wired 6 microswitches as NC limit
switches, and
the relevant statements in init.c are
ch0->LimitSwitchOptions = 0x123;
ch0->LimitSwitchNegBit = 169;
ch0-LimitSwitchPosBit = 168;
and similar for ch1 and ch2
(170,171,172,173).
I have wired the switches (through a simple
breakout
board) to pins 9-14 of KSTEP J36. 24 volt
power is on pin
8 and all switches complete a circuit to 24
volt return.
The Digital I/O screen of Kmotion (KSTEP Tab)
shows that
one of these opto inputs will transition from
checked
(high?) to unchecked (low?) when I manually
depress a
switch.
I have two related questions on the size of
steps. My
motors are 200 steps/rev. I find that 3200
"counts" on the
Step Response screen causes one full
revolution of the
motor. This seems to be independent of the
value assigned
to chX->InvDistPerCycle in the init.c file.
I also get
one full revolution from the script statement
MoveRel0 = 3200
Question 2) Does parameter
chX->InvDistPerCycle have
any effect on the functioning of Kmotion
screens?
Question 3) Do I correctly infer that 16
"counts" are one
full revolution?
Dave